#!/usr/bin/env python3
# coding=utf-8
import sys
import requests
import pprint
# from bs4 import BeautifulSoup

queryWord = sys.argv[1]
queryUrl = "http://dict.baidu.com/s?wd="+queryWord+"&from=poem"
print(queryUrl)
req = requests.get(queryUrl)
html = req.text
print(html)
#soup = BeautifulSoup(html, 'html.parser')
#div = soup.find(name='div', attrs={'class':'trans-container'})
#
#if div:
#    wordBuff=div.get_text();
#    wordBuff=wordBuff.replace(' ','')
#    wordBuff=wordBuff.replace('\t','')
#    printBuff=wordBuff.replace('\n',' ')
#    pprint.pprint(printBuff,width=40)
